package scientistengineer.blogspot.affrpor;


import android.app.ListActivity;
import android.os.Bundle;
import android.view.View;
import android.view.ViewGroup;
import android.view.View.OnClickListener;
import android.widget.BaseAdapter;
import android.widget.Button;
import android.widget.TextView;

public class AcessoriesListActivity extends ListActivity {
	
private AccessoriesAdapter mAdapter;
	
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		
		mAdapter = new AccessoriesAdapter();
		setListAdapter(mAdapter);
		
	}
	
	private static class AccessoriesViewHolder {

        public TextView content;
    }
	
	private class AccessoriesAdapter extends BaseAdapter {

		@Override
		public int getCount() {
			// TODO Auto-generated method stub
			return 0;
		}

		@Override
		public Object getItem(int position) {
			// TODO Auto-generated method stub
			return null;
		}
  
        @Override
        public long getItemId(int position) {
            return position;
        }

        @Override
        public View getView(int position, View convertView, ViewGroup parent) {

            AccessoriesViewHolder holder = null;

            if (convertView == null) {
                convertView = getLayoutInflater().inflate(R.layout.item_listview, parent, false);

                holder = new AccessoriesViewHolder();
                holder.content = (TextView) convertView.findViewById(R.id.textView1Item2);

                ((Button) convertView.findViewById(R.id.buttonPlay_Port)).setOnClickListener(mBuyButtonClickListener);

                convertView.setTag(holder);
            } else {
                holder = (AccessoriesViewHolder) convertView.getTag();
            }

            return convertView;
        }

    }
	private OnClickListener mBuyButtonClickListener = new OnClickListener() {
        @Override
        public void onClick(View v) {
            // TODO Cyril: Not implemented yet!
        }
    };


}
